//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using CommunityServer.Components;

namespace CommunityServer.Components
{
    /// <summary>
    /// Represents a user who is online
    /// </summary>
    public class UserOnline
    {
        public UserOnline(User user)
        {
            this._user = user;
        }

        public UserOnline(User user, Guid id)
        {
            this._user = user;
            this._AnonymousId = id;
        }

        private User _user;
        private DateTime _lastVisit = DateTime.Now;
        private string _location = "Unknown Location";
        private string _link = null;
        private Guid _AnonymousId;
        
        

        public Guid AnonymousId
        {
            get{ return _AnonymousId;}
        }

        public int UserID
        {
            get { return this.User.UserID;}
        }


        public string UserName
        {
            get{ return this.User.Username;}
        }

        public DateTime LastActivity
        {
            get{return _lastVisit;}
            set{_lastVisit = value;}
        }
        public string Location
        {
            get {return _location;}
            set{_location = value;}
        }
        public string Link
        {
            get {return _link;}
            set{_link = value;}
        
        }

        
        public User User
        {
            get { return _user;}
        }
    }
}